<!DOCTYPE html>
<html>
  <head>
    <title>我的待办</title>
	
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">
	<meta charset="utf-8">
	<meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
  </head>


<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<!-- 插件样式 -->
<link rel="stylesheet" type="text/css" href="./css/sm.css">
<link rel="stylesheet" type="text/css" href="./css/sm-extend.css">

<link rel="stylesheet" type="text/css" href="../css/weui/example.css">
<link rel="stylesheet" type="text/css" href="../css/weui/weui.css" />

<script src="../js/jquery-2.1.1.js"></script>

<!-- 插件js -->
<script src="./js/zepto.js"></script>
<script src="./js/sm.js" ></script>
<script src="./js/sm-extend.js" ></script>

<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="../js/min/modernizr-custom-v2.7.1.min.js"></script>
<script src="../js/min/hammer-v2.0.3.min.js" ></script>
<script src="../js/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
<script src="../js/common.js"></script>
<script type="text/javascript">
	window.$$=window.Zepto = Zepto;
</script>
<body>
	<header class="bar bar-nav">
	    <a class="button button-link button-nav pull-left" href="javaScript:history.go(-1)" data-transition="slide-out">
	      <span class="icon icon-left"></span>
	      返回
	    </a>
	    <h1 class="title">我的待办</h1>
	  </header>
<div class="content" style="background: #ffffff;">
  <div class="list-block">
    <ul id="info_list">
      <!-- <li class="item-content item-link">
        <div class="item-media"><i class="icon icon-f7"></i></div>
        <div class="item-inner">
          <div class="item-title">蓝居合同内容一</div>
        </div>
      </li> -->
    </ul>
  </div>
</div>

<script type="text/javascript">
$(function(){
	loadHetongList();	//待签合同
	
})

function loadHetongList(){
	//var index = bootstrap.loading("加载中...");
	$$.showPreloader("加载中");
	$.ajax({
		url : "../agreement/getList.do",
		data : {
			userIdFlag: "1",
			agreementType: '1',	//0:租客合同  1:房东合同
			status: "0",
			pageSize: 50,
			pageNumber: 1
		},
		type : "GET",
		dataType : 'json',
		cache : false,
		success : function(ret){
			//bootstrap.close(index);
			$$.hidePreloader();
			var html = '';
			if(ret.rows && ret.rows.length>0){
				$.each(ret.rows,function(i,n){
					html += '<li class="item-content item-link" onclick="toLink(\'../lanju/hetongDetail.jsp?agreementId='+n.agreementId+'\')">'+
						        '<div class="item-media"><i class="icon icon-f7"></i></div>'+
						        '<div class="item-inner">'+
						          '<div class="item-title">[合同] '+n.agreementName+'</div>'+
						        '</div>'+
						     '</li>';
				});
			}
			
			if( html=='' && $("#info_list").find("li").length==0 ){
				$("#info_list").html( html||'<li class="item-content item-link">暂无待办</li>' )
			}else{
				$("#info_list").append(html);
			}
		},
		error: function(){
			//bootstrap.close(index);
			//$("#info_list").html( html||'<li class="item-content item-link">查询出错</li>' )

			$$.hidePreloader();
			$$.toast("加载待签合同出错");
		}
	});
}


function toLink(txt,tagrt) {
	document.location.href = "./" + txt;
}


</script>
</body>
</html>
